/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.market.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import java.util.List;
import com.google.common.collect.Lists;

import com.kaaction.common.persistence.DataEntity;
import com.kaaction.modules.eb.entity.Product;

/**
 * 活动Entity
 * @author zengbiao
 * @version 2017-04-22
 */
public class Event extends DataEntity<Event> {
	
	private static final long serialVersionUID = 1L;
	private String type;		// 活动类型
	private String name;		// 活动名称
	private String title;		// 活动标题
	private String subTitle;		// 活动副标题
	private String brief;		// 简介
	private String description;		// 详情
	private Date eventStartDate;		// 开始日期
	private Date eventEndDate;		// 截止日期
	private Date interactStartDate;		// 参与开始
	private Date interactEndDate;		// 参与截止
	private String address;		// 地址
	private String coverImage;		// 封面
	private String coverImages;		// 封面图片集
	private String moreImages;		// 详情图片集
	private Integer enrollLimit;		// 每日参与数
	private Integer enrollDayLimit;	
	private double productFloorPrice;
	private double productFloorPriceForShow;
	private String pageTemplate;		// 页面模板
	private String note;		// 备注
	
	private Product product;	//促销产品
	
	private List<EventFlow> eventFlowList = Lists.newArrayList();		// 子表列表
	private List<EventLottery> eventLotteryList = Lists.newArrayList();		// 子表列表
	private List<EventPrize> eventPrizeList = Lists.newArrayList();		// 子表列表
	
	
	private String channelIds;		// 
	
	public Event() {
		super();
	}

	public Event(String id){
		super(id);
	}

	@Length(min=1, max=3, message="活动类型长度必须介于 1 和 3 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getSubTitle() {
		return subTitle;
	}

	public void setSubTitle(String subTitle) {
		this.subTitle = subTitle;
	}
	
	public String getBrief() {
		return brief;
	}

	public void setBrief(String brief) {
		this.brief = brief;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="开始日期不能为空")
	public Date getEventStartDate() {
		return eventStartDate;
	}

	public void setEventStartDate(Date eventStartDate) {
		this.eventStartDate = eventStartDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="截止日期不能为空")
	public Date getEventEndDate() {
		return eventEndDate;
	}

	public void setEventEndDate(Date eventEndDate) {
		this.eventEndDate = eventEndDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInteractStartDate() {
		return interactStartDate;
	}

	public void setInteractStartDate(Date interactStartDate) {
		this.interactStartDate = interactStartDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInteractEndDate() {
		return interactEndDate;
	}

	public void setInteractEndDate(Date interactEndDate) {
		this.interactEndDate = interactEndDate;
	}
	
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	@Length(min=0, max=200, message="封面长度必须介于 0 和 200 之间")
	public String getCoverImage() {
		return coverImage;
	}

	public void setCoverImage(String coverImage) {
		this.coverImage = coverImage;
	}
	
	public String getCoverImages() {
		return coverImages;
	}

	public void setCoverImages(String coverImages) {
		this.coverImages = coverImages;
	}
	
	public String getMoreImages() {
		return moreImages;
	}

	public void setMoreImages(String moreImages) {
		this.moreImages = moreImages;
	}
	
	public Integer getEnrollLimit() {
		return enrollLimit;
	}

	public void setEnrollLimit(Integer enrollLimit) {
		this.enrollLimit = enrollLimit;
	}
	
	@Length(min=0, max=45, message="页面模板长度必须介于 0 和 45 之间")
	public String getPageTemplate() {
		return pageTemplate;
	}

	public void setPageTemplate(String pageTemplate) {
		this.pageTemplate = pageTemplate;
	}
	
	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}
	
	public List<EventFlow> getEventFlowList() {
		return eventFlowList;
	}

	public void setEventFlowList(List<EventFlow> eventFlowList) {
		this.eventFlowList = eventFlowList;
	}
	public List<EventLottery> getEventLotteryList() {
		return eventLotteryList;
	}

	public void setEventLotteryList(List<EventLottery> eventLotteryList) {
		this.eventLotteryList = eventLotteryList;
	}
	public List<EventPrize> getEventPrizeList() {
		return eventPrizeList;
	}

	public void setEventPrizeList(List<EventPrize> eventPrizeList) {
		this.eventPrizeList = eventPrizeList;
	}

	public String getChannelIds() {
		return channelIds;
	}

	public void setChannelIds(String channelIds) {
		this.channelIds = channelIds;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public Integer getEnrollDayLimit() {
		return enrollDayLimit;
	}

	public void setEnrollDayLimit(Integer enrollDayLimit) {
		this.enrollDayLimit = enrollDayLimit;
	}

	public double getProductFloorPrice() {
		return productFloorPrice;
	}

	public void setProductFloorPrice(double productFloorPrice) {
		this.productFloorPrice = productFloorPrice;
	}

	public double getProductFloorPriceForShow() {
		return productFloorPriceForShow;
	}

	public void setProductFloorPriceForShow(double productFloorPriceForShow) {
		this.productFloorPriceForShow = productFloorPriceForShow;
	}
	
}